﻿<phone:PhoneApplicationPage 
    x:Class="MyRun.Views.QQUploadPhoto"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="40"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="1.7*"/>
            <RowDefinition Height="100"/>
        </Grid.RowDefinitions>
        <StackPanel x:Name="logoPanel" Orientation="Horizontal" Grid.Column="0" Grid.Row="0" >
            <TextBlock x:Name="txtTitle" Text="上传照片" Margin="20,0,0,0" VerticalAlignment="Center" FontSize="22"/>
        </StackPanel>
        <!--字数统计-->
        <StackPanel x:Name="countPanel"   Grid.Row="1" 
                HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
            <TextBlock x:Name="tb_count" FontFamily="Comic Sans MS" Text="{Binding ElementName=tbx_caption, Path=Text.Length}" Foreground="DarkGray"/>
            <TextBlock Text="/140" Margin="0,0,35,0" Foreground="DarkGray" FontFamily="Comic Sans MS"/>
        </StackPanel>
        <TextBox x:Name="tbx_caption" Margin="18,0,18,0" Text="" 
                FontSize="24"  TextWrapping="Wrap" VerticalScrollBarVisibility="Visible"
                AcceptsReturn="True" TextChanged="tbx_caption_TextChanged" 
                BorderBrush="#181818" Padding="8" Opacity="0.6" BorderThickness="1"
                Grid.Row="2" />
        <Grid x:Name="imgPanel" Grid.Row="3">
            <Border x:Name="outborder" Margin="31,9,31,20" BorderThickness="1" BorderBrush="DarkGray" CornerRadius="4"/>
            <Border x:Name="middleborder" Margin="32,10,32,21" BorderThickness="2" BorderBrush="White" CornerRadius="4"/>
            <Border x:Name="innerborder" Margin="33,11,33,22" BorderThickness="1" BorderBrush="DarkGray" CornerRadius="4"/>
            <Image x:Name="img_pic" Margin="34,12,34,23"/>
        </Grid>
        <StackPanel x:Name="btnPanel" Orientation="Horizontal" Margin="0,0,0,20"
                Grid.Row="4" Grid.ColumnSpan="3" HorizontalAlignment="Right">
            <Button x:Name="btn_upload" Content="上传" Click="upload_Click" Margin="0,0,0,10"
                Width="150" Height="75" />
            <Button x:Name="btn_cancel" Content="取消" Click="cancel_Click"
                Width="150" Height="75" Margin="0,0,20,10" />
        </StackPanel>
    </Grid>

</phone:PhoneApplicationPage>
